<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 请应⽤ prototype 写⼀个类继承多个类的案例 -->
    <script>
      //定义一个Person类
      function Person(name, age) {
        this.name = name
        this.age = age
        //定义一个info函数
        this.info = function () {
          document.writeln('年龄' + this.age + '姓名' + this.name)
        }
      }
      //创建Person类的实例对象
      var pson = new Person('wangzong', 16)
      //调用p1的info方法
      pson.info()
      var pson2 = new Person('liyuan', 17)
      pson2.info()
    </script>
  </body>
</html>
